//
//  LHReadCommentCell.m
//  EPA
//
//  Created by 卢浩 on 16/4/25.
//  Copyright © 2016年 卢浩. All rights reserved.
//

#import "LHReadCommentCell.h"
#import "LHReadCommentModel.h"

@implementation LHReadCommentCell

- (void)layoutSubviews{
    NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithURL:[NSURL URLWithString:self.model.userinfo[@"icon"]] completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
        if (data) {
            dispatch_async(dispatch_get_main_queue(), ^{
                self.imgView.image = [UIImage imageWithData:data];
            });
        }
    }];
    [dataTask resume];
    self.usernameLable.text = self.model.userinfo[@"uname"];
    self.timeLable.text = self.model.addtime_f;
    self.contentLable.text = self.model.content;
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
